package com.sharedlease.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author 吴钟富
 * @since 2021-03-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Product对象", description="产品表")
public class Product implements Serializable {

    public static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ID_WORKER)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    public Long id;

    public Long mid;

    public String title;

    public Integer legal;

    public Double buyPrice;

    public Double rentPrice;

    public String description;

    public String tag;

    public String rentRule;

    @ApiModelProperty(value = "已购买的数量")
    public Integer sellNum;

    public Integer surplus;

    public Integer cycles;

    public String picPath1;

    public String picPath2;

    public String picPath3;

    public String picPath4;

    public Integer onlyRent;

    public String get_title_desc_rule(){
        return title + description + rentRule;
    }




}
